﻿namespace ConsoleApp8
{
    //引发表达式
    internal class Program
    {
        static void Main(string[] args)
        {
            int dividend = 10;
            int divisor = 0;

            int result = divisor == 0 ? throw new DivideByZeroException("error") : dividend / divisor;
            Console.WriteLine(result);


        }
    }
}